import Vue from "vue"
import Vuex from 'vuex'

Vue.use(Vuex)

const store = new Vuex.Store({
	state:{
		userInfo:uni.getStorageSync("userInfo") ? uni.getStorageSync("userInfo") : {}, //用户信息
		identity:1,//身份
	},
	mutations:{
		ChangeUserInfo(state,userInfo){
			state.userInfo = userInfo
			
		},
		ChangeIdentity(state,identity){
			state.identity = identity
		}
	}
})

export default store